import 'osc_notice.dart';

class OscFriendsListEntity {
	List<User> userList;
	OscNotice notice;

	OscFriendsListEntity({this.userList, this.notice});

	OscFriendsListEntity.fromJson(Map<String, dynamic> json) {
		if (json['userList'] != null) {
			userList = new List<User>();(json['userList'] as List).forEach((v) { userList.add(new User.fromJson(v)); });
		}
		notice = json['notice'] != null ? new OscNotice.fromJson(json['notice']) : null;
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		if (this.userList != null) {
      data['userList'] =  this.userList.map((v) => v.toJson()).toList();
    }
		if (this.notice != null) {
      data['notice'] = this.notice.toJson();
    }
		return data;
	}
}

class User {
	int gender;
	String name;
	String expertise;//技能
	String portrait;//头像
	int userId;

	User({this.gender, this.name, this.expertise, this.portrait, this.userId});

	User.fromJson(Map<String, dynamic> json) {
		gender = json['gender'];
		name = json['name'];
		expertise = json['expertise'];
		portrait = json['portrait'];
		userId = json['userid'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['gender'] = this.gender;
		data['name'] = this.name;
		data['expertise'] = this.expertise;
		data['portrait'] = this.portrait;
		data['userid'] = this.userId;
		return data;
	}
}
